package com.project.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.ProjectCountBean;
import com.project.mapper.IProjectCountMapper;
import com.project.service.IProjectCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ProjectCountServiceImpl implements IProjectCountService {
    public int PAGESIZE = 3;
    @Autowired
    private IProjectCountMapper mapper;

    @Override
    public PageInfo<ProjectCountBean> findByNum(int pageNO, Integer startNum, Integer endNum) {
        PageHelper.startPage(pageNO,PAGESIZE);
        PageInfo<ProjectCountBean> pageInfo = PageInfo.of(mapper.findByNum(startNum,endNum));
        return pageInfo;
    }
}
